<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	response.setHeader("X-Frame-Options","SAMEORIGIN");
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<jsp:include page="../../public/public.jsp"/>
<script type="text/javascript">
	$(function(){
		init();
	})
	function refresh(){
		$('#datagrid').datagrid("reload");
	}
	function init() {
		$('#datagrid').datagrid({
			url : "<%=basePath%>ipLog/queryLogNearly", //获取数据地址
			fit : true, //适应大小
			fitColumns : false, //自动扩大或缩小列的尺寸以适应网格的宽度并且防止水平滚动
			nowrap : false, //是否关闭自动换行(true关闭，false开启)
			border : false, //边框
			toolbar:menu_tb,//加载按钮功能
			remoteSort : false,
			singleSelect : true,
			rownumbers : true,
			columns : [ [ {
				title : "年月",
				field : "maxTime",
				align : 'center',
				width :150
			}, {
				/* title : "IP访问量", */
				title : "网站访问量",
				field : "ipCount",
				align : 'center',
				width : 160
				
			}/* ,{
				title : "页面浏览量",
				field : "pvCount",
				align : 'center',
				width : 160
			},{
				title : "独立客户端",
				field : "uvCount",
				align : 'center',
				width : 160
			} */] ]
		});
	}
</script>
</head>
<body class="easyui-layout">
	<div style="height: 100%; width: 100%">
		<div id="menu_tb">
		     <table>       
		     	<tr>
		            <td>
		                <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-mini-refresh" plain="true" onclick="refresh()">刷新列表</a>
		            </td>
		             <td style="width: 170px;">
		                
		             </td>
		             <td>
		               <span style="color: blue;">近一年网站访问量分析</span>
		            </td>
		        </tr>
		    </table>
		</div>
	<table id="datagrid"></table>
</div>
</body>
</html>